package com.galeno.day03.transfer;

import org.apache.flink.api.common.functions.FilterFunction;
import org.apache.flink.streaming.api.operators.AbstractUdfStreamOperator;
import org.apache.flink.streaming.api.operators.OneInputStreamOperator;
import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;

/**
 * @author galeno
 * @Title:
 * @Description: 自定义Filter算子
 * @date 2021/10/1710:15
 */
public class MyFilterDemo {
    public static void main(String[] args) {


        new FilterFunction<String>(){

            @Override
            public boolean filter(String s) throws Exception {
                return !s.startsWith("error");
            }
        };



    }

//
//    private static class MyStreamFilter<I> extends AbstractUdfStreamOperator<I,FilterFunction<I>> implements OneInputStreamOperator<I>{
//
//        public MyStreamFilter(FilterFunction<I> userFunction) {
//            super(userFunction);
//        }
//
//        @Override
//        public void processElement(StreamRecord<> streamRecord) throws Exception {
//
//        }
//    }


}
